{include inc/top.html}
<script src="{__DATA_URL__}js/jquery.rvf.1.2.js"></script>
<script src="{__DATA_URL__}dialog/lhgdialog.min.js?self=true&skin=discuz"></script>
<script src="{__CURTPL_URL__}js/vod.js"></script>
<script>
    function preview(file){
        $('#preview').attr('src' , '{__UPLOAD_URL__}' + file.url);
        $('#v_cover').val(file.url);
    }
</script>
<div class="index-main">
    <h1 class="h-title">{$atitle}
        <span class="sub-nav">
            <a href="{url:'admin@vod-list'}">返回列表</a>
        </span>
     </h1>
    <br/>
    <form action="{url:'admin@vod-save'}" id="form" method="post" class="form">
    <!-- SO_MISC -->
    <input type="hidden" name="vod[id]"       id="v_id"       value="{:intval($vod['id'])}"/>
    <input type="hidden" name="vod[rec]"      id="v_rec"      value="{:intval($vod['rec'])}"/>
    <input type="hidden" name="vod[top]"      id="v_top"      value="{:intval($vod['top'])}"/>
    <input type="hidden" name="vod[tread]"    id="v_tread"    value="{:intval($vod['tread'])}"/>
    <input type="hidden" name="vod[views]"    id="v_views"    value="{:intval($vod['views'])}"/>
    <input type="hidden" name="vod[plays]"    id="v_plays"    value="{:intval($vod['plays'])}"/>
    <input type="hidden" name="vod[score]"    id="v_score"    value="{:intval($vod['score'])}"/>
    <input type="hidden" name="vod[mosaics]"  id="v_mosaics"  value="{:intval($vod['mosaics'])}"/>
    <input type="hidden" name="vod[udate]"    id="v_udate"    value="{:REQUEST_TIME}"/>
    <!-- EO_MISC -->

    <!-- SO_ACT -->
    <input type="hidden" name="vod[lang]"     id="v_lang"     value="{:intval($vod['lang'])}"/>
    <input type="hidden" name="vod[status]"   id="v_status"   value="{:intval($vod['status'])}"/>
    <input type="hidden" name="vod[director]" id="v_director" value="{$vod['director'] ? $vod['director'] : '佚名'}"/>
    <input type="hidden" name="vod[actor]"    id="v_actor"    value="{$vod['actor'] ? $vod['actor'] : '佚名'}"/>
    <input type="hidden" name="vod[release]"  id="v_release"  value="{:date('Y-m-d' , $vod['release'] ? $vod['release'] : REQUEST_TIME)}"/>
    <!-- EO_ACT -->

    <!-- SO_SEO -->
    <input type="hidden" name="vod[tpl]"      id="v_tpl"      value="{:intval($vod['tpl'])}"/>
    <input type="hidden" name="vod[key]"      id="v_key"      value="{$vod['key']}"/>
    <input type="hidden" name="vod[desc]"     id="v_desc"     value="{$vod['desc']}"/>
    <input type="hidden" name="vod[sname]"    id="v_sname"    value="{$vod['sname']}"/>
    <!-- EO_SEO -->

    <input type="hidden" name="vod[cover]"    id="v_cover"    value="{$vod['cover'] ? $vod['cover'] : 'images/null.gif'}"/>
    <textarea name="url"       id="v_url"  class="input" style="display:none">{foreach $url $k $v}{$v['id']}#{$v['player']}{$player[$v['player']]}#{$v['name']}#{$v['url'] . "\n"}{/foreach}</textarea>
    <textarea name="vod[info]" id="v_info" class="input" style="display:none">{$vod['info']}</textarea>

    <table class="table">
        <tr>
            <td class="td right"  width="80">名称:</td>
            <td class="td left td1" width="300">
                <input type="text" name="vod[name]" id="v_name" pyurl="{url:'admin@system-getpy'}" class="req input" nullmsg="请输入视频名称" errmsg="请勿超过100个字" rule="require" msgid="name_msg" value="{$vod['name']}" maxlimit="100" mlen="1"/>
                <div class="error-warpper">
                    <span id="name_msg" class="error-tips"></span>
                </div>
            </td>
            <td class="td right" rowspan="4" width="60">封面:</td>
            <td class="td left td1"  rowspan="4">
                <div style="text-align:center;width:110px;">
                {if $vod['cover']}
                    <img src="{__UPLOAD_URL__}{$vod['cover']|thumb}" id="preview" class="border-gray" width="{$thumb[0] ? $thumb[0] : 100}" height="{$thumb[1] ? $thumb[1] : 140}"/>
                {else}
                    <img src="{__DATA_URL__}images/null.gif"   id="preview" class="border-gray" width="{$thumb[0] ? $thumb[0] : 100}" height="{$thumb[1] ? $thumb[1] : 140}"/>
                {/if}<br/>
                    <iframe src="{url:'admin@system-upload-water-1-tw-100-th-80-cb-preview'}" style="height:30px;width:110px;border:none;overflow:hidden;" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no" allowtransparency="yes"></iframe>
                </div>
            </td>
        </tr>
        <tr>
            <td class="td right" >地区:</td>
            <td class="td left td1" >
                <select id="v_region" name="vod[region]" class="v_select select" msgid="region_msg">
                    {foreach $rlist $k $v}
                        <option value="{$v['id']}" {$v['id'] == $vod['cat'] ? 'selected' : ''} last="{$v['last'] ? 1:0}">
                            {if substr_count($v['path'] , '#') > 2 }
                                {:str_repeat('&nbsp;&nbsp;&nbsp;' , substr_count($v['path'] , '#') - 3)}
                                &nbsp;└&nbsp;
                            {/if}
                            {$v['name']}</option>
                    {/foreach}
                </select>
                <div class="error-warpper">
                <span id="region_msg" class="error-tips"></span>
                </div>
            </td>
        </tr>
        <tr>
            <td class="td right">分类:</td>
            <td class="td left td1">
                <select id="v_select" name="vod[cat]" class="v_select select" msgid="select_msg">
                    {foreach $plist $k $v}
                        <option value="{$v['id']}" {$v['id'] == $vod['cat'] ? 'selected' : ''} last="{$v['last'] ? 1:0}">
                            {if substr_count($v['path'] , '#') > 2 }
                                {:str_repeat('&nbsp;&nbsp;&nbsp;' , substr_count($v['path'] , '#') - 3)}
                                &nbsp;└&nbsp;
                            {/if}
                            {$v['name']}</option>
                    {/foreach}
                </select>
                <div class="error-warpper">
                    <span id="select_msg" class="error-tips"></span>
                </div>
            </td>
        </tr>
        <tr>
            <td class="td right">播放地址:</td>
            <td class="td left">
                <a href="javascript:void(0);" class="dialog" ajaxurl="{url:'admin@vod-url'}" title="批量新增播放地址">编辑</a>
            </td>
        </tr>
        <tr>
            <td class="td right">属性相关:</td>
            <td class="td left"  valign="top">
                <div class='preview_misc'></div>
                <a href="javascript:void(0);" class="dialog" ajaxurl="{url:'admin@vod-misc'}" title="视频属性编辑">编辑</a>
            </td>
        </tr>
        <tr>
            <td class="td right" >视频信息:</td>
            <td class="td left" >
                <div class='preview_actor'></div>
                <a href="javascript:void(0);"  class="dialog" ajaxurl="{url:'admin@vod-actor'}" title="视频信息编辑">编辑</a>
            </td>
        </tr>
        <tr>
            <td class="td right">SEO相关:</td>
            <td class="td left"  valign="top">
                <div class='preview_seo'></div>
                <a href="javascript:void(0);" class="dialog" ajaxurl="{url:'admin@vod-seo'}" title="SEO属性编辑">编辑</a>
            </td>
        </tr>
        <tr>
            <td class="td right" >内容介绍:</td>
            <td class="td left" >
                <div class='preview_info'></div>
                <a href="javascript:void(0);"  class="dialog" ajaxurl="{url:'admin@vod-info'}" title="内容介绍编辑">编辑</a>
            </td>
        </tr>
        <tr>
            <td class="td right" ></td>
            <td class="td left">
                <input type="button" id="sbtn" url="{url:'vod-save'}"  class="button" value="确定"/>&nbsp;
                <span id="desc_msg" class="error-tips"></span>
            </td>
        </tr>

    </table>
    <div class="clear"></div>
</div>
{include inc/bottom.html}